﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmListarProductos.aspx.cs" Inherits="Presentacion.frmListarProductos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <br />
<asp:Label ID="Label1" runat="server" Text="Ingrese Descripción:"></asp:Label>
&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="txtBusca" runat="server" Width="153px"></asp:TextBox>
&nbsp;
<asp:Button ID="btnBuscar" runat="server" Text="Buscar" Width="112px" />
&nbsp;<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataSourceID="ObjectDataSource1" Width="572px" AllowPaging="True" 
        CellPadding="4" ForeColor="#333333" GridLines="None">
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    <Columns>
        <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
        <asp:BoundField DataField="Descripcion" HeaderText="Descripcion" 
            SortExpression="Descripcion" />
        <asp:BoundField DataField="Precio" HeaderText="Precio" 
            SortExpression="Precio" DataFormatString="{0:c}" />
        <asp:BoundField DataField="Stock" HeaderText="Stock" SortExpression="Stock" />



    </Columns>
    <EditRowStyle BackColor="#999999" />
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#E9E7E2" />
    <SortedAscendingHeaderStyle BackColor="#506C8C" />
    <SortedDescendingCellStyle BackColor="#FFFDF8" />
    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="BuscarProductoPorNombre" TypeName="BL.ProductoBL">
    <SelectParameters>
        <asp:ControlParameter ControlID="txtBusca" DefaultValue="%" Name="nombre" 
            PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
